package com.lucweb.service.impl;


import com.lucweb.dao.WxtaskDao;
import com.lucweb.entity.TaskWx;
import com.lucweb.service.WxService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("wxService")
public class WxServiceImpl implements WxService {



    @Resource
    private WxtaskDao wxtaskDao;


    @Override
    public String newWxTask() {

        return this.wxtaskDao.wxTaskNumber();
    }

    @Override
    public void saveOrUpdate(TaskWx taskWx) {


        wxtaskDao.saveOrUpdate(taskWx);

    }

    @Override
    public TaskWx getWxtaskById(int taskId) {
        return this.wxtaskDao.getWxTaskById(taskId);
    }

    @Override
    public boolean deleteWxtask(int taskId) {
        wxtaskDao.deleteWxtask(taskId);
        return true;
    }

    @Override
    public List<TaskWx> showTaskByName(String companyName) {
        return this.wxtaskDao.wxTask(companyName);
    }


}
